﻿using Autofac;

namespace Super.Hmi.Modules
{
    public class ViewModelModule : Module
    {
        /// <summary>
        /// 注册 ViewModel 模块
        /// </summary>
        /// <param name="builder"></param>
        protected override void Load(ContainerBuilder builder)
        {
            builder.RegisterAssemblyTypes(System.Reflection.Assembly.GetExecutingAssembly())
                .Where(t => t.Name.EndsWith("ViewModel"))
                .AsSelf()
                .InstancePerLifetimeScope();
        }
    }
}
